package de.pyranja.storage.support;

import de.pyranja.storage.core.Archive;
import de.pyranja.storage.core.Storage;


/**
 * Component aware factory that produces *Action.
 * @author Chris Borckholder
 */
public class ActionFactory {
	
	private final Archive archive;
	private final Storage storage;
	
	public ActionFactory(Archive archive, Storage storage) {
		super();
		this.archive = archive;
		this.storage = storage;
	}
	
	public ClaimAction claim(String id) {
		return new ClaimAction(id, archive);
	}
	
	public ReleaseAction release(String id) {
		return new ReleaseAction(id, archive, storage);
	}
	
	public SaveAction save(String id) {
		return new SaveAction(id, archive, storage);
	}
}
